package com.simple.gateway.center.domian.manage.bo;

import com.simple.gateway.center.basedata.po.GatewayServer;
import com.simple.gateway.center.domian.manage.dto.GatewayServerDTO;
import lombok.Data;

/**
 * 项目: simple-gateway-core
 *
 * 功能描述:
 *
 * @author: WuChengXing
 *
 * @create: 2023-08-07 11:30
 **/
@Data
public class GatewayServerBO {

    /**
     * 分组标识
     */
    private String groupId;

    /**
     * 分组名称
     */
    private String groupName;

    public static GatewayServerDTO bo2Dto(GatewayServerBO bo) {
        GatewayServerDTO gatewayServerDTO = new GatewayServerDTO();
        gatewayServerDTO.setGroupId(bo.getGroupId());
        gatewayServerDTO.setGroupName(bo.getGroupName());
        return gatewayServerDTO;
    }

    public static GatewayServerBO do2Bo(GatewayServer gatewayServer) {
        GatewayServerBO bo = new GatewayServerBO();
        bo.setGroupId(gatewayServer.getGroupId());
        bo.setGroupName(gatewayServer.getGroupName());
        return bo;
    }
}
